package com.gdcnano.nanoamp.media.sound.playlist
{
	public class PlaylistFactory
	{
		/*
		Playlist types
		*/
		public static const XSPF:String = "XSPF";
		
		public static const M3U:String = "M3U";
		
		
		private static var _xspfPlaylistCreator:PlaylistCreator = new XSPFPlaylistCreator();
		
		private static var _m3uPlaylistCreator:PlaylistCreator = new M3UPlaylistCreator();
		
		public function PlaylistFactory()
		{
		}
		
		public static function createPlaylist(playlistType:String):IPlaylist
		{
			switch (playlistType)
			{
				case XSPF: 
					return _xspfPlaylistCreator.createPlaylist();
				case M3U: 
					return _m3uPlaylistCreator.createPlaylist();
				default:
					return null;
			}
		}
	}
}